home *** CD-ROM | disk | FTP | other *** search
/ Interactive Web Graphics with Shout 3D / Interactive Web Graphics With Shout 3D.iso / mac / Code / Chapter Code.exe / Chapter04 / twocolorbox.s3d < prev    next >
Text File  |  2000-08-31  |  990b  |  54 lines

  1. Transform {
  2.  
  3.   translation   0 0 0
  4.  
  5.   children   Shape {
  6.     appearance [
  7.       Appearance {
  8.          material   Material {
  9.             diffuseColor 0 1 0 #green
  10.  
  11.          }
  12.        }
  13.       MultiAppearance {
  14.          material   Material {
  15.             diffuseColor 1 0 0 #red
  16.          }
  17.          selfIlluminate true 
  18.        }
  19.  
  20.     ]   
  21.     geometry   MultiMesh {
  22.       coord   Coordinate {
  23.         point  
  24.            [ -1 1 1,
  25.            -1 -1 1,
  26.             1 1 1,
  27.             1 -1 1,
  28.             1 1 -1,
  29.             1 -1 -1,
  30.            -1 1 -1,
  31.            -1 -1 -1 ]
  32.       }
  33.  
  34.       coordIndex 
  35.          [ 0, 1, 3, 2, -1,
  36.            4, 5, 7, 6, -1,
  37.            6, 7, 1, 0, -1,
  38.            2, 3, 5, 4, -1,
  39.            6, 0, 2, 4, -1,
  40.            1, 7, 5, 3, -1 ]
  41.  
  42.    appearanceIndex 
  43.           [ 0,
  44.             0,
  45.             0,
  46.             1,
  47.             1,
  48.             1, ]   
  49.  
  50.     } #end of MultiMesh
  51.   } #end of Shape
  52. } #end of Transform
  53.  
  54.